package com.sarees.test;
import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.openqa.selenium.server.SeleniumServer;

import lib.System.Utility.Report;
import lib.app.online.AppUtil;

import com.sarees.main.util.WebUtil;
import com.thoughtworks.selenium.DefaultSelenium;
import com.thoughtworks.selenium.SeleneseTestCase;


public class BaseClass //extends SeleneseTestCase
{
	SeleniumServer selServer;
	public WebUtil w = new WebUtil();
	//create app util object
	AppUtil app = AppUtil.getObj(w);

	///protected AppUtil appUtil = new AppUtil(w);
	
	
	public BaseClass()
	{
		
	}
	//start selenium server for the browser gioven
	@Before
	public void startServerOpenURL() throws Exception
	{
		//WebUtil w2 = new WebUtil();
		Report.writeTCHeading("Starting the server...");
		//start bthe server 
		w.checkAndStartServer();
		
		
		//start the server instance
		w.chekAndStartSeleniumInstance();
		//check if the server started or report the error in results
		w.openHomePage();
		
		//check if the url is valid and opens 
		
		
		//check if the home page is opened
		
		
	}
	
	@After
	public void closeBrowsersAndServer()
	{
		w.stopServerInstance();
		w.stopServer();
		Report.close();
		
	}
	
	

}
